home *** CD-ROM | disk | FTP | other *** search
- <?xml version="1.0"?>
-
-
- <bindings id="autocompleteBindings"
- xmlns="http://www.mozilla.org/xbl"
- xmlns:html="http://www.w3.org/1999/xhtml"
- xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- xmlns:xbl="http://www.mozilla.org/xbl">
-
- <?xml-stylesheet href="chrome://yoono/skin/search.css" type="text/css"?>
- <binding id="yoonoSearch"
- extends="chrome://global/content/bindings/textbox.xml#textbox">
-
- <resources>
- <stylesheet src="chrome://yoono/skin/search.css"/>
- </resources>
-
- <content>
-
- <xul:hbox flex="1">
-
- <xul:hbox anonid="textbox-input-box" align="center" flex="1" xbl:inherits="tooltiptext=inputtooltiptext">
-
- <xul:button type="menu" anonid="yoono-searchengine-button"
- class="dropmarker" popup="_child"
- xbl:inherits="src=image,value=engine">
-
- <xul:menupopup anonid="yoono-searchengine-popup"
- position="after_start"
- oncommand="this.parentNode.parentNode.parentNode.parentNode.switchengine(event)">
- <xul:menuitem label="google" value="google"
- type="checkbox"
- image="chrome://yoono/skin/favicons/google.png"/>
- <xul:menuitem label="yahoo" value="yahoo"
- type="checkbox"
- image="chrome://yoono/skin/favicons/yahoo.png"/>
- </xul:menupopup>
- </xul:button>
-
- <html:input anonid="input" class="autocomplete-textbox textbox-input"
- flex="1" allowevents="true"
- xbl:inherits="tooltiptext=inputtooltiptext,onfocus,onblur,value,type,maxlength,disabled,size,readonly,userAction"/>
- </xul:hbox>
- </xul:hbox>
-
- </content>
-
- <implementation>
- <property name="engine">
- <setter><![CDATA[
- var button = this;
- button.setAttribute("image", "chrome://yoono/skin/favicons/" + val + ".png");
- button.setAttribute("engine", val);
- ]]></setter>
- <getter><![CDATA[
- var button = this;
- return (button.getAttribute("engine"));
- ]]></getter>
- </property>
-
- <method name="switchengine">
- <parameter name="aEvent"/>
- <body><![CDATA[
- var menuitem = aEvent.target;
- var eng = menuitem.getAttribute('value');
- this.engine = eng;
- ]]></body>
- </method>
-
- </implementation>
-
- </binding>
-
- </bindings>
-
-